import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqPublicMiniPlayerHelper } from "./SeqPublicMiniPlayerHelper";
import { SeqStringHelper } from "./SeqStringHelper";
import { SPublicMiniPlayer } from "./SPublicMiniPlayer";
type int = number;
//class SPublicNotice
// did
export class SPublicNotice extends IMessageBase {
  constructor(arg1: Boolean = false) {
    
    super();if (arg1) {
      MessageManager.instance().regist(this);
    }
    return;
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SPublicNotice();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    arg1.writeString(this.content);
    arg1.writeInt(this.area);
    arg1.writeInt(this.type);
    arg1.writeInt(this.code);
    SeqPublicMiniPlayerHelper.write(arg1, this.publicMiniplayers);
    arg1.writeInt(this.minLevel);
    arg1.writeString(this.msgKey);
    SeqStringHelper.write(arg1, this.params);
    return;
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.content = arg1.readString();
    this.area = arg1.readInt();
    this.type = arg1.readInt();
    this.code = arg1.readInt();
    this.publicMiniplayers = SeqPublicMiniPlayerHelper.read(arg1);
    this.minLevel = arg1.readInt();
    this.msgKey = arg1.readString();
    this.params = SeqStringHelper.read(arg1);
    return;
  }

  public /* const */ _type: int = 7;

  public /* var */ content!: string;

  public /* var */ area!: int;

  public /* var */ type!: int;

  public /* var */ code!: int;

  public /* var */ publicMiniplayers!: Array<SPublicMiniPlayer>;

  public /* var */ minLevel!: int;

  public /* var */ msgKey!: string;

  public /* var */ params!: Array<string>;

  public static /* var */ _regist: SPublicNotice = new SPublicNotice(true);
}
